package cn.shiwei.hr.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 1363732197@qq.com
 * @since 2021-12-10
 */
@TableName("t_kill_course")
@Data
public class KillCourse extends Model<KillCourse> {

    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private String code;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 秒杀场次编号,同一个课程多次发布，编号不一样
     */
    @TableField("session_number")
    private String sessionNumber;
    /**
     * 课程名字
     */
    @TableField("course_name")
    private String courseName;
    /**
     * 对应的课程ID
     */
    @TableField("course_id")
    private Long courseId;
    @TableField("kill_price")
    private BigDecimal killPrice;
    @TableField("kill_count")
    private Integer killCount;
    /**
     * 秒杀课程排序
     */
    @TableField("kill_sort")
    private Integer killSort;
    /**
     * 秒杀状态:0待发布，1秒杀中，2秒杀结束
     */
    public static final int KILL_STATUS_NOT_ONLINE = 0;
    public static final int KILL_STATUS_ONLINE = 1;
    public static final int KILL_STATUS_END_ONLINE = 2;
    @TableField("kill_status")
    private Integer killStatus;
    @TableField("course_pic")
    private String coursePic;
    /**
     * 秒杀开始时间
     */
    @TableField("start_time")
    private Date startTime;
    /**
     * 秒杀结束时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}


